import axios from "axios";

let config = {
    baseURL: "http://26.239.98.70:3000",
    timeout: 50000
}

const instance = axios.create(config);

instance.interceptors.request.use(config => {
    const token = localStorage.getItem("token");
    if (token) {
        config.headers['Authorization'] = token;
    }
    return config;
}, error => {
    return Promise.reject(error);
});

export default instance;